Method: OpenCV::CvCircle32f#[]
- Defined in:
- ext/opencv/cvcircle32f.cpp
#[] ⇒ Number
Accesses to parameters of the circle by array-like interface ([X-coordinate, Y-coordinate, radius])
64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 |
# File 'ext/opencv/cvcircle32f.cpp', line 64
VALUE
rb_aref(VALUE self, VALUE index)
{
switch (NUM2INT(index)) {
case 0:
return DBL2NUM(CVCIRCLE32F(self)->center.x);
break;
case 1:
return DBL2NUM(CVCIRCLE32F(self)->center.y);
break;
case 2:
return DBL2NUM(CVCIRCLE32F(self)->radius);
break;
default:
rb_raise(rb_eIndexError, "index should be 0...3");
break;
}
return Qnil;
}
|